<template>
  <div class="article">
    <comHeader pageTitle="资讯中心"></comHeader>
    <div class="article-header">
      <h2>{{ data.title }}</h2>
      <p>{{ data.createDate }}</p>
    </div>
    <div class="article-content" v-html="data.artContent"></div>
  </div>
</template>

<script>
  import comHeader from 'components/common/comHead'

  export default {
    data () {
      return {
        data: {}
      }
    },
    created () {
      console.log(this.$route.params.uuid)
      this.$http.get(`/api/base/baseArticle/view?uuid=${this.$route.params.uuid}`)
        .then((res) => {
          if (res.data.success) {
            this.data = res.data.data
          }
        })
        .catch((err) => {
          alert('请检查您的网络~', err)
        })
    },
    components: {
      comHeader
    }
  }
</script>

<style lang='scss'>
  @import '../../common/scss/_variable.scss';

  .article {
    &-header {
      text-align: center;
      font-size: 0;
      h2 {
        font-size: 38px;
        color: $base-333;     
        margin-top: 40px;
        padding: 0 80px;
        line-height: 50px;
      }
      p {
        font-size: 32px;
        color: #666;
        margin: 26px 0 36px 0;
      }
    }
    &-content {
      padding: 0 30px;
      font-size: 28px;
      color: $base-666;
      p {
          padding-bottom:15px;
          line-height:60px;
      }
      img {
          width:80%;
          height:auto;
      }
    }
  }
</style>
